import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
//列表数据
export const columns: BasicColumn[] = [
  {
    title: '样品id',
    align: "center",
    dataIndex: 'samId',
    ifShow:false
  },
  {
    title: '样品类型',
    align: "center",
    dataIndex: 'samType',
    width:160
  },
  {
    title: '样品编号',
    align: "center",
    dataIndex: 'samNum',
    width:160
  },
  {
    title: '样品名称',
    align: "center",
    dataIndex: 'samName',
    width:160
  },
  {
    title: '流转标识',
    align: "center",
    dataIndex: 'recordMark',
    width:180
  },
  {
    title: '操作人员',
    align: "center",
    dataIndex: 'operatePerson',
    width:160
  },
  {
    title: '流转时间',
    align: "center",
    dataIndex: 'recordTime',
    width:160
  },
  {
    title: '流转描述',
    align: "center",
    dataIndex: 'recordRemark'
  },
];

//查询数据
export const searchFormSchema: FormSchema[] = [
  {
    label: "样品编号",
    field: 'samNum',
    component: 'Input',
    colProps: {span: 6},
  },
  {
    label: "样品名称",
    field: 'samName',
    component: 'Input',
    colProps: {span: 6},
  },
  {
    label: "操作人员",
    field: 'operatePerson',
    component: 'Input',
    colProps: {span: 6},
  },
];

//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '样品id',
    field: 'samId',
    component: 'Input',
  },
  {
    label: '样品编号',
    field: 'samNum',
    component: 'Input',
  },
  {
    label: '样品名称',
    field: 'samName',
    component: 'Input',
  },
  {
    label: '流转标识',
    field: 'recordMark',
    component: 'Input',
  },
  {
    label: '操作人员',
    field: 'operatePerson',
    component: 'Input',
  },
  {
    label: '流转时间',
    field: 'recordTime',
    component: 'DatePicker',
    componentProps: {
      showTime: true,
      valueFormat: 'YYYY-MM-DD HH:mm:ss'
    },
  },
  {
    label: '流转描述',
    field: 'recordRemark',
    component: 'Input',
  },
	// TODO 主键隐藏字段，目前写死为ID
  {
    label: '',
    field: 'id',
    component: 'Input',
    show: false,
  },
];
